<template>
  <div class="home">
    <img alt="Vue logo" src="../assets/logo.png">
    <button @click="msg1 = '张三'">点我改 msg</button>
    <button @click="dataLogTap">获取变量最新数据</button>
    <p>{{ msg1 }}</p>
    <HelloWorld msg="Welcome to Your Vue.js App" />
  </div>
</template>

<script>
// @ is an alias to /src
import HelloWorld from '@/components/HelloWorld.vue'

export default {
  name: 'HomeView',
  data () {
    return {
      msg1: 'hello'
    }
  },
  components: {
    HelloWorld
  },
  methods: {
    dataLogTap () {
      console.log('data = ', this.$data)
    }
  }
}
</script>
